var auth_array = new Array(6);
var url_array = new Array('http://192.168.209.33/sailun/api_jsonrpc.php',
    'http://172.16.101.102/zabbix/api_jsonrpc.php',
    'http://192.168.150.5/sailun/api_jsonrpc.php',
    'http://192.168.100.142/sailun/api_jsonrpc.php',
    'http://192.168.19.36/zabbix/api_jsonrpc.php',
    'http://192.168.150.172/zabbix/api_jsonrpc.php');
var auth = '';

function auth_get(url) {
    // 用stringify方法把普通数据转成json格式
    var json_data = JSON.stringify({
        "jsonrpc": "2.0",
        "method": "user.login",
        "params": {
            "user": 'Admin',
            "password": 'zabbix'
        },
        "id": 1,
        "auth": null
    });
    $.ajax({
        url: url,
        async: false,
        method: 'post',
        dataType: 'json',
        headers: {
            "Content-Type": "application/json"
        },
        data: json_data,
        success: function(data) {
            // console.log(data.result);
            auth = data.result;
            // 请求成功后的结果放在data里面
        }
    });
    return auth;
}

function authGetAll() {
    for (i = 0; i < 6; i++) {
        auth_array[i] = auth_get(url_array[i]);
        console.log(auth_array[i]);
        console.log(url_array[i]);
    }
}

authGetAll();